function install(req, request, login) {
	const apiUrl = {
		savexcxUserInfo: '/www/app/savexcxUserInfo.do', //绑定身份信息
		saveUsersjhm: '/www/app/saveUsersjhm.do', //更换手机号码
		getbingCode: '/www/app/getbingCode.do' ,//获取绑定手机时验证码
		getWxUserInfo : '/www/app/getWxUserInfo.do',//获取用户信息
	};
	req.user = {
		/* 登陆*/
		login() {
			return login();
		},
		/* 绑定身份信息*/
		savexcxUserInfo(name, zjhm, sjhm, usermodCode) {
			const url = req.baseUrl + apiUrl.savexcxUserInfo;
			var data = {
				name,
				zjhm,
				sjhm,
				usermodCode,
				bdFlag : 1 //表示不校验是否绑定手机号
			};
			return request({
				url,
				data
			});
		},
		/* 更换手机号码*/
		saveUsersjhm(sjhm,usermodCode) {
			const url = req.baseUrl + apiUrl.saveUsersjhm;
			var data = {
				sjhm,
				usermodCode
			};
			return request({
				url,
				data
			});
		},
		/* 获取绑定手机时验证码*/
		getbingCode(sjhm) {
			const url = req.baseUrl + apiUrl.getbingCode;
			var data = {
				sjhm,
			};
			return request({
				url,
				data
			});
		},
		/* 获取用户信息 */
		getWxUserInfo(clientId){
			const url = req.baseUrl + apiUrl.getWxUserInfo;
			var data = {
				clientId,
			};
			return request({
				url,
				data
			});
		}
	};
}

module.exports = {
	install,
};
